<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>axios基本使用</title>
</head>

<body>

  <script src="./js/axios.min.js"></script>
  <script>
    axios.get('http://127.0.0.1:3000/axios?id=55').then((data) => {
      // console.log(res.data)
      const { data: res } = data
      console.log(res)
    })


    axios.get('http://127.0.0.1:3000/axios/4').then((data) => {
      // console.log(res.data)
      const { data: res } = data
      console.log(res)
    })


    axios.get('http://127.0.0.1:3000/axios', {
      params: {
        id: 666
      }
    }).then((data) => {
      // console.log(res.data)
      const { data: res } = data
      console.log(res)
    })

    axios.delete('http://127.0.0.1:3000/axios', {
      params: {
        id: 666777
      }
    }).then((data) => {
      // console.log(res.data)
      const { data: res } = data
      console.log(res)
    })
  </script>
</body>

</html>